<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt"  prefix="c"%>


<c:choose>
	<c:when test="${not empty errorMessage}">
		<script>
			alert("Error :  ${errorMessage}");
		</script>
	</c:when>
	<c:when test="${not empty successMessage}">
		<script>
			alert("success : ${successMessage}");
		</script>
	</c:when>
	<c:otherwise>
	</c:otherwise>
</c:choose>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>Student Info Form</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link rel="stylesheet" href="css/jquery/theme/jquery-ui-1.9.1.custom.css"/>
 	<link rel="stylesheet" href="css/college.css"/> 
 <script src="js/jquery/jquery-1.8.2.js"></script>
 <script src="js/jquery/jquery-ui-1.9.1.custom.js"></script>
<style>
		.ui-widget{
			font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: large;
		}
	</style>
</head>

<body>
	<h2 align="center">Student Info Form</h2>
	<form:form id="form1" name="form1" method="post" action="savestudent.htm" modelAttribute="student">
		
		
		<table  align="center" cellpadding="5" id="studentform">
			<tr>
				<td align="right">Hallticket Number:</td>
				<td><label> <input type="text" name="htno" id="htno" />
				</label>
				</td>
			</tr>
			<tr>
				<td align="right">Name</td>
				<td><label> <input type="text" name="name" id="name" />
				</label>
				</td>
			</tr>
			<tr>
				<td align="right">Branch</td>
				<td>
					<form:select path="branch.code" items="${branchList}" itemLabel="code" itemValue="code">
						
					</form:select>
						
					
						
				</td>
			</tr>
			<tr>
		      <td  align="right">Select Section:</td>
		      <td >
		      	 <select name="section" size="1" id="section">
		    		 <option value="N">None</option>
		   			 <option value="A">A</option>
		   			 <option value="B">B</option>
		   			 
		   		</select>
		      </td>
		      </tr>
			<tr>
		      <td  align="right">Select Year:</td>
		      <td >
		      	 <select name="year" size="1" id="year">
		    		 <option value="1">I Year</option>
		   			 <option value="2">II Year</option>
		   			 <option value="3">III Year</option>
		   			 <option value="4">IV Year</option>
		   		</select>
		      </td>
		      </tr>
		      <tr>
		      <td  align="right">Select Sem:</td>
		      <td >
		      	 <select name="sem" size="1" id="sem">
		    		 <option value="1">I Sem</option>
		   			 <option value="2">II Sem</option>
		   			 
		   		</select>
		      </td>
    </tr>
			<tr>
            <td align="right" scope="row">Father Name:</td>
            <td><label>
              <input type="text" name="contactDetails.fatherName" id="father_name" />
            </label></td>
          </tr>
          <tr>
            <td align="right" scope="row">Mobile:</td>
            <td><input type="text" name="contactDetails.mobile" id="mobile" /></td>
          </tr>
          <tr>
            <td align="right" scope="row">e-Mail:</td>
            <td><input type="text" name="contactDetails.email" id="email" /></td>
          </tr>
          <tr>
            <td align="right" scope="row">Parent Mobile1:</td>
            <td><input type="text" name="contactDetails.parentMobile1" id="parent_mobile1" /></td>
          </tr>
          <tr>
            <td align="right" scope="row">Parent Mobile2:</td>
            <td><input type="text" name="contactDetails.parentMobile2" id="parent_mobile2" /></td>
          </tr>
          <tr>
            <td align="right" scope="row">address:</td>
            <td><label>
              <textarea name="contactDetails.address" id="contactDetails.address" cols="20" rows="5"></textarea>
            </label></td>
          </tr>
			<tr>
				<td colspan="2" align="center"><form:input path="" type="submit" value="Save Student"/> &nbsp;</td>
			</tr>
		</table>
		
		
		
	</form:form>
	<p align="center">&nbsp;</p>
	
<script src="js/college.js"></script>
</body>
</html>
